package demo1;

public class Duck extends Animal implements IFlyable,IRunable,ISwimable{
    public Duck(String name, int age) {
        super(name, age);
    }

    @Override
    public void flying() {
        System.out.println(this.name +"正在飞...");
    }

    @Override
    public void running() {
        System.out.println(this.name +"正在跑...");

    }

    @Override
    public void swimming() {
        System.out.println(this.name +"正在游...");
    }

    @Override
    public void eat() {
        System.out.println(this.name +"正在吃鸭粮...");
    }
}
